package org.jeecg.modules.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.activiti.engine.runtime.ProcessInstance;
import org.jeecg.modules.base.service.BaseCommonService;
import org.jeecg.modules.base.service.impl.BaseCommonServiceImpl;
import org.jeecg.modules.dto.ActProcessInstDto;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

public interface IActProcessInstService {

    IPage<ActProcessInstDto> listPage(ProcessInstance instance, Integer pageNo, Integer pageSize);

    @Transactional(readOnly = false)
    ActProcessInstDto getProcInstance(String procInsId);

    @Transactional(readOnly = false)
    String startProcess(String procDefKey, String businessTable, String businessId);

    @Transactional(readOnly = false)
    String startProcess(String procDefKey, String businessTable, String businessId, String title);

    @Transactional(readOnly = false)
    String startProcess(String procDefKey, String businessTable, String businessId, String title, Map<String, Object> vars);

    @Transactional(readOnly = false)
    String updateState(String procInstId, Boolean suspended);

    void delete(String procInstId);
}
